﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Irony.Ast;
using Irony.Interpreter;
using Irony.Parsing;

namespace ConciseMarkupLanguage.Ast
{
    class TagNode : AstNode
    {
        public override void Init(ParsingContext context, ParseTreeNode treeNode)
        {
            base.Init(context, treeNode);
            AsString = treeNode.ChildNodes[0].FindTokenAndGetText();
            if (treeNode.ChildNodes.Count >= 2)
                AddChild("attrs", treeNode.ChildNodes[1]);
        }
    }
}
